/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package com.structural.Adapter;

import java.text.SimpleDateFormat;

/**
 *
 * @author jmg
 */
public class AutoAdapter {
    
    private Auto a;

    public AutoAdapter(Auto a) {
        this.a = a;
    }
    
    //marca;modela;dd/MM/aaaa
    
    public String getInfoAuto(){
        
        SimpleDateFormat sdf = new SimpleDateFormat("dd/MM/aaaa");
        
        StringBuilder builder = new StringBuilder();
        builder.append(a.getMarca());
        builder.append(";");
        builder.append(a.getModelo());
        builder.append(";");
        builder.append(sdf.format(a.getFechaFabricacion()));
        
        return builder.toString();
    }
    
}
